package com.hzit.test08;

/**
 * 作者：Dzm
 * 时间：2024-07-06-10:08
 * 功能：
 */
public class Book {
    public int bid; //图书编号
    public String bname;    //图书名称
    public double price;    //图书单价
    public String publisher;    //出版社
    public int num;     //购买数量

    public Book(int bid, String bname, double price, String publisher, int num) {
        this.bid = bid;
        this.bname = bname;
        this.price = price;
        this.publisher = publisher;
        this.num = num;
    }

    @Override
    public String toString() {
        return bid + "\t\t" +
                bname + "\t\t" +
                price + "\t\t" +
                publisher + "\t" +
                num + "\t\t\t" +
                price*num;
    }
}
